package cn.kgc.springmvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author 课工场
 * @date 2024/2/27
 * @description
 */
@Controller
@RequestMapping("user")
public class UserController {

    //  /user/add   String  -> 视图名   -> 视图解析器的解析   /hello.jsp   转发
    @RequestMapping(value = "add",method = {RequestMethod.GET,RequestMethod.POST})
    // @RequestMapping("/user/add")
    public String  method1(){
        return "hello";
    }


    //   /user/delete  多路径的映射关系
    @RequestMapping(value = {"delete","remove"})
    public String  method2(){
        return "hello";
    }


}
